package org.eiahe.hr.attendance.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.eiahe.hr.attendance.domain.LeaveApplication;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 请假申请视图对象 hr_leave_application
 *
 * @author zhangnn
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = LeaveApplication.class)
public class LeaveApplicationVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 申请ID
     */
    @ExcelProperty(value = "申请ID")
    private Long applicationId;

    /**
     * 工号
     */
    @ExcelProperty(value = "工号")
    private String employeeNo;

    /**
     * 员工姓名
     */
    @ExcelProperty(value = "员工姓名")
    private String employeeName;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 请假类型
     */
    @ExcelProperty(value = "请假类型")
    private String leaveType;

    /**
     * 请假类型名称
     */
    @ExcelProperty(value = "请假类型名称")
    private String leaveTypeName;

    /**
     * 开始时间
     */
    @ExcelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @ExcelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    /**
     * 请假天数
     */
    @ExcelProperty(value = "请假天数")
    private BigDecimal leaveDays;

    /**
     * 请假事由
     */
    @ExcelProperty(value = "请假事由")
    private String leaveReason;

    /**
     * 附件
     */
    @ExcelProperty(value = "附件")
    private String attachment;

    /**
     * 审批状态(0待审批 1审批中 2已通过 3已拒绝)
     */
    @ExcelProperty(value = "审批状态")
    private String approvalStatus;

    /**
     * 数据来源
     */
    @ExcelProperty(value = "数据来源")
    private String source;

    /**
     * OA系统ID
     */
    @ExcelProperty(value = "OA系统ID")
    private String oaId;

    /**
     * 状态
     */
    @ExcelProperty(value = "状态")
    private String status;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
